-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use idle_timeout for the requests #109
Conversation
Test fails on 0.7, not because of this PR though:
|
I'm running I've modified for i in 1:10
include("read_only_api_tests.jl")
HTTP.ConnectionPool.showpool(STDOUT)
sleep(40)
end |
But the |
You will need |
ok, no, the idle_timeout=20 is a |
008e552
to
8be5b51
Compare
Updated to be a request option. |
That seems to be working (note that the local socket number is different after the 2nd run): Test Summary: | Pass Total
Tags and References | 1 1
ConnectionPool[
⏸ 63↑ 63↓ api.github.com:443:53937 ≣16
]
Test Summary: | Pass Total
Owners | 9 9
Test Summary: | Pass Total
Repositories | 16 16
Test Summary: | Pass Total
Issues | 4 4
Test Summary: | Pass Total
Gists | 5 5
Test Summary: | Pass Total
Reviews | 1 1
Test Summary: | Pass Total
Activity | 4 4
Test Summary: | Pass Total
Apps | 4 4
Test Summary: | Pass Total
Git Data | 4 4
Test Summary: | Pass Total
Tags and References | 1 1
ConnectionPool[
⏸ 63↑ 63↓ api.github.com:443:53939 ≣16
] |
Before the change I aws seeing this: Test Summary: | Pass Total
Tags and References | 1 1
ConnectionPool[
⏸ 63↑ 63↓ api.github.com:443:53854 ≣16
]
Test Summary: | Pass Total
Owners | 9 9
Test Summary: | Pass Total
Repositories | 16 16
Test Summary: | Pass Total
Issues | 4 4
Test Summary: | Pass Total
Gists | 5 5
Test Summary: | Pass Total
Reviews | 1 1
Test Summary: | Pass Total
Activity | 4 4
Test Summary: | Pass Total
Apps | 4 4
Test Summary: | Pass Total
Git Data | 4 4
Test Summary: | Pass Total
Tags and References | 1 1
ConnectionPool[
⏸ 126↑ 126↓ api.github.com:443:53854 ≣16
] |
Ok, @ararslan, should we make Nanosoldier a guinea pig for this (in other words update HTTP and use this PR) or what do you prefer? |
I'm just reviewing the diffs since last HTTP.jl tag now. I think I'm ok to tag, but I might be better to wait for @quinnj's input. It would probably be best to manually checkout this branch of GitHub.jl and master of HTTP.jl on nanosolidier to test. |
That seems fine to me. There's actually a way to set up a test server for Nanosoldier but it's way more effort than just subjecting people to testing in production, so.................. |
I've reviewed the recent HTTP.jl changes. All the significant changes were already well reviewed in their respective PRs, and only take effect when new options are enabled, so it they seem pretty low risk. I've tagged HTTP.jl https://github.com/JuliaWeb/HTTP.jl/releases/tag/v0.6.8 |
Nanosoldier seems to be running well using HTTP master and this branch of GitHub. There have only been a handful of triggered runs since this was set up, but there's been no ignoring and no |
Was removed in b602c4e : > Remove yeild() after @async writebody. This should increase the chance > that the startread() realises that the connection is dead before the > body is written. This change appears to have caused problems in other situations: JuliaCloud/AWSS3.jl#26 (comment) The removal was driven by nanosoldier/GitHub.jl issues with POST requests on long-held connections. #220 (comment) GitHub.jl now handles this with the `idle_timeout=` option. JuliaWeb/GitHub.jl#109
@ararslan it would be a good idea to update the nanosolider box to use latest HTTP master to test this change: JuliaWeb/HTTP.jl@fa6b206 |
Should this be merged first? |
This looks good to be merged to me (but I don't have commit access here). |
See JuliaCloud/AWSS3.jl#26 (comment) |
Looks like travis passes for 0.6 but not for 0.7. New HTTP version is tagged and waiting for METADATA PR: JuliaLang/METADATA.jl#14286 |
30cb24e
to
d09e3b5
Compare
Passes on 0.7 locally now but needs new release of MbedTLS (JuliaLang/MbedTLS.jl#137) |
d09e3b5
to
87b11a2
Compare
What's the status of this? |
Not sure if this is still needed after all the new stuff in HTTP.jl. |
I think if the github API is known to dump connections after x seconds, then having idle_timeout=x * some_fraction is the right thing to do, event if other changes in HTTP.jl improved the automatic retry behaviour. |
A few more dep warnings now but this is a step in the right direction. |
cc @samoconnor